<?php
namespace Common\Models;
use Common\BaseModel;
class ViewHomeXcxConfig extends BaseModel
{
    public $res;
    public $expire;
    public function initialize()
    {
        parent::initialize();
        $this->setSource('view_home_xcx_config');
    }


    public function get_xcx($type="home"){
        $AppConfigDb = new AppConfig();
        $app_config = $AppConfigDb->find_list("xcx_version");
        if($app_config){
            $condtions="version='{$app_config['xcx_version']}' AND type='{$type}'";
            $get_list = $this->findFirst(array(
                $condtions,
            ));
        }else{
            $get_list = $this->findFirst();
        }
        return $get_list;
    }


}
